#ifndef PRODUCT_DETAIL_WIDGET_H
#define PRODUCT_DETAIL_WIDGET_H

#include <QWidget>
#include <QSplitter>
#include <QVBoxLayout>
#include <QGridLayout>
#include <QLabel>
#include <QPushButton>
#include <QScrollArea>
#include <QDateTime>

class ProductDetailWidget : public QWidget
{
    Q_OBJECT

public:
    explicit ProductDetailWidget(QWidget *parent = nullptr);
    void setupProductInfo(const QPixmap &image, const QString &theme,
                          const QString &descriptionText, const QString &location,
                          const QString &price, const QString date,int productId);
    void setupProductInfo(const QPixmap &image, const QString &theme,
                     const QString &descriptionText, const QString &price, int productId);
    void setupComments();

private:
    int productId;

    QSplitter *splitter;
    QWidget *productInfoWidget;
    QWidget *commentsWidget;
    QPushButton *cartButton;
    QLabel *imageLabel ;
    QLabel *titleLabel;
    QLabel *priceLabel;
public slots:
    void onAddToCartClicked();
};

#endif // PRODUCT_DETAIL_WIDGET_H
